package uk.ac.glasgow.demosocs.tests;

import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import uk.ac.glasgow.demosocs.Election;
import uk.ac.glasgow.demosocs.VotingSystem;

public class ViewElectionTest{

	BufferedReader input;
	PrintWriter output;
	Election e;
	VotingSystem vs;
	
	@Before
	public void setUp() throws Exception{
		vs = new ElectionManager();
		vs.setCurrentUser("admin","password");
		input = new BufferedReader(new InputStreamReader(in));
		output = new PrintWriter(out);
		e = new Elections("Test");
	}

	@After
	public void tearDown() throws Exception{
		input = null;
		output = null;
		e = null;
		vs = null;
	}

	@Test testViewElection1(){
		output.println("View Election");
		output.println("Head Of School");
		String check = input.readline();
		assertEquals("Head of School Details", check);
	}


	@Test testViewElection2(){
		output.println("View Election");
		output.println("Head Of School");
		String check = input.readline();
		assertEquals(null, check);
	}
}